#version 330 core
layout (location = 0) in vec3 aPos;
uniform mat4 projection;
uniform mat4 view;
out vec4 fragColor;
void main()
{
   gl_Position = projection * view * vec4(aPos.x,aPos.y,aPos.z, 1.0);
   if(aPos.x>0.1)
   {
   fragColor = vec4(1.0f,0.0f,0.0f,1.0f);  
   }
   else if(aPos.y>0.1)
   {
   fragColor = vec4(0.0f,1.0f,0.0f,1.0f);
   }
   else if(aPos.z>0.1)
   {
   fragColor = vec4(0.0f,0.0f,1.0f,1.0f);
   }
   else
   {
   fragColor = vec4(0.0f,0.0f,0.0f,1.0f);     
   }
}